package graphique;

import java.awt.Color;
import java.awt.Cursor;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;

import javax.swing.*;
/**
 * Class creant le type CButton, servant a la creation du calendrier
 * @author Nico
 *
 */

public class CButton extends JLabel implements ActionListener{
	public CButton(String name)
    {

        this.setText(name);
        this.setFont(new java.awt.Font("Comic Sans MS", Font.BOLD, 11));
        this.setForeground(Color.darkGray);
        this.setOpaque(true);
        this.setBackground(Color.lightGray);
        this.setHorizontalAlignment(SwingConstants.CENTER);
        this.setHorizontalTextPosition(SwingConstants.CENTER);
        this.setSize(25, 19);
        this.setCursor(new Cursor(Cursor.HAND_CURSOR));

    }
    public void mouseMoved(MouseEvent e) {
      this.setCursor(new Cursor(Cursor.MOVE_CURSOR));
      this.setForeground(Color.darkGray);
    }
	@Override
	public void actionPerformed(ActionEvent e) {
		System.out.println(this.getName());
	}
    
    
    
}
